<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<c:import url="/WEB-INF/jsp/head.jsp"/>
</head>
<body>

	<c:import url="/WEB-INF/jsp/cabecalho.jsp"/>
	
	<h3 align="center">Matrícula em Formação</h3>
	
	<div align="center">
		<form>
			<select name="formacao.id" id="formacaoId">
				<c:forEach items="${formacaoList}" var="formacao">
					<option value="${formacao.id}">${formacao.nome}</option>
				</c:forEach>
			</select>
			<br/>
			<input type="button" value="Próximo>>" onclick="proximo()" />
		</form>
	</div>

	<div align="center">
		<br /><br /><br />
		<a href="<c:url value="/"/>">Voltar</a>
	</div>

	<c:import url="/WEB-INF/jsp/rodape.jsp"/>
<script type="text/javascript">
	function proximo(){
		window.location = "<c:url value="/matriculaFormacao/form/"/>"+document.getElementById('formacaoId').value;
	}
</script>
</body>
</html>